package com.ruoyi.canteen.service.impl;

import java.util.List;

import com.ruoyi.canteen.vo.CanteenQrAddrVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.canteen.mapper.CanteenQrAddressMapper;
import com.ruoyi.canteen.domain.CanteenQrAddress;
import com.ruoyi.canteen.service.ICanteenQrAddressService;

/**
 * 扫码地址Service业务层处理
 * 
 * @author zhangw
 * @date 2021-09-26
 */
@Service
public class CanteenQrAddressServiceImpl implements ICanteenQrAddressService 
{
    @Autowired
    private CanteenQrAddressMapper canteenQrAddressMapper;

    /**
     * 查询扫码地址
     * 
     * @param id 扫码地址主键
     * @return 扫码地址
     */
    @Override
    public CanteenQrAddress selectCanteenQrAddressById(Long id)
    {
        return canteenQrAddressMapper.selectCanteenQrAddressById(id);
    }

    /**
     * 查询-现场点餐桌号详情
     * @param id 扫码地址主键
     * @return 扫码地址
     */
    @Override
    public CanteenQrAddrVo selectCanteenQrAddrDetailById(Long id)
    {
        return canteenQrAddressMapper.selectCanteenQrAddrDetailById(id);
    }

    /**
     * 查询扫码地址列表
     * 
     * @param canteenQrAddress 扫码地址
     * @return 扫码地址
     */
    @Override
    public List<CanteenQrAddress> selectCanteenQrAddressList(CanteenQrAddress canteenQrAddress)
    {
        return canteenQrAddressMapper.selectCanteenQrAddressList(canteenQrAddress);
    }

    /**
     * 新增扫码地址
     * 
     * @param canteenQrAddress 扫码地址
     * @return 结果
     */
    @Override
    public int insertCanteenQrAddress(CanteenQrAddress canteenQrAddress)
    {
        return canteenQrAddressMapper.insertCanteenQrAddress(canteenQrAddress);
    }

    /**
     * 修改扫码地址
     * 
     * @param canteenQrAddress 扫码地址
     * @return 结果
     */
    @Override
    public int updateCanteenQrAddress(CanteenQrAddress canteenQrAddress)
    {
        return canteenQrAddressMapper.updateCanteenQrAddress(canteenQrAddress);
    }

    /**
     * 批量删除扫码地址
     * 
     * @param ids 需要删除的扫码地址主键
     * @return 结果
     */
    @Override
    public int deleteCanteenQrAddressByIds(Long[] ids)
    {
        return canteenQrAddressMapper.deleteCanteenQrAddressByIds(ids);
    }

    /**
     * 删除扫码地址信息
     * 
     * @param id 扫码地址主键
     * @return 结果
     */
    @Override
    public int deleteCanteenQrAddressById(Long id)
    {
        return canteenQrAddressMapper.deleteCanteenQrAddressById(id);
    }
}
